package san;

public class GuanYu {

    private String name="关云长";
    //在GuanYu类中声明了属性DragonBlade
    //这就是"依赖"关系,关羽依赖青龙偃月刀
    private DragonBlade dragonBlade;

    public void fight(){
        System.out.println(name+"使用"+dragonBlade+"战斗");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public DragonBlade getDragonBlade() {
        return dragonBlade;
    }

    public void setDragonBlade(DragonBlade dragonBlade) {
        this.dragonBlade = dragonBlade;
    }
}
